using System;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace ViewController.Gameplay
{
    public class NextLevel : MonoBehaviour
    {
        /// <summary>
        /// 下一关名字
        /// </summary>
        public string levelName;

        private void OnTriggerEnter2D(Collider2D col)
        {
            if (col.CompareTag("Player"))
            {
                SceneManager.LoadScene(levelName);
            }
        }
    }
}